<{include file="public/admin_header" /}>
<style>
    select { border: 1px solid #DBDBDB; padding: 5px 5px 5px 2px; height: 38px; width:33%;}
</style>
<fieldset class="layui-elem-field layui-field-title" style="margin-top:0;">
    <legend><{$MenuName}>修改</legend>
</fieldset>
<form class="layui-form-pane" action="<{:url('edit')}>" enctype="multipart/form-data" method="post">
    <div class="layui-form-item">
        <label class="layui-form-label">文章分类</label>
        <div class="layui-input-inline inputTextWidth">
            <select class="HelpType" style="height:38px;width:30%;" onchange="TypeSelectCall(this,'<{:url('GetTypeList')}>','Help');">
                <option value="0">1级分类</option>
                <{volist name="HelpTypeListOne" id="val"}>
                <option value="<{$val.TypeID}>_<{$val.TypePath}>" <{if condition="$HelpTypePathArr[0] eq $val['TypeID']"}>selected<{/if}>><{$val.TypeName}></option>
                <{/volist}>
            </select>
            <{if condition="!empty($HelpTypePathArr[1]) && $HelpTypePathArr[1] gt 0"}>
            <select class="HelpType" style="height:38px;width:30%;" onchange="TypeSelectCall(this,'<{:url('GetTypeList')}>','Help');">
                <option value="0">2级分类</option>
                <{volist name="HelpTypeListTwo" id="val"}>
                <option value="<{$val.TypeID}>_<{$val.TypePath}>" <{if condition="$HelpTypePathArr[1] eq $val['TypeID']"}>selected<{/if}>><{$val.TypeName}></option>
                <{/volist}>
            </select>
            <{/if}>
            <{if condition="!empty($HelpTypePathArr[2]) && $HelpTypePathArr[2] gt 0"}>
            <select class="HelpType" style="height:38px;width:30%;" onchange="TypeSelectCall(this,'<{:url('GetTypeList')}>','Help');">
                <option value="0">3级分类</option>
                <{volist name="HelpTypeListThree" id="val"}>
                <option value="<{$val.TypeID}>_<{$val.TypePath}>" <{if condition="$HelpTypePathArr[2] eq $val['TypeID']"}>selected<{/if}>><{$val.TypeName}></option>
                <{/volist}>
            </select>
            <{/if}>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">文章名称</label>
        <div class="layui-input-inline inputTextWidth">
            <input type="text" name="HelpTitle" size="40" value="<{$Info.HelpTitle}>" class="layui-input"/>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label" style="height: 120px;padding-top:50px;">文章摘要</label>
        <div class="layui-input-inline inputTextWidth" style="width: 80%;">
            <textarea name="HelpAbstract" style="width: 80%; height: 118px;"><{$Info.HelpAbstract}></textarea>
        </div>
    </div>
    <div class="layui-form-item inputTextWidth" pane>
        <label class="layui-form-label">文章图片</label>
        <div class="layui-input-inline">
            <input type="file" name="HelpPicPath" style="padding: 5px;"/>
            <{if condition="$Info['HelpPicPath'] neq ''"}>
            <!--<a href="<{$FileSeat.$Info.HelpPicPath}>" target="_blank">预览</a>-->
            <img src="<{$FileSeat.$Info.HelpPicPath}>" width="80" />
            <{/if}>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label" style="height:403px;padding-top:150px;">文章详情</label>
        <div class="layui-input-inline inputTextWidth" style="width: 80%; ">
            <textarea id="EditContent" name="HelpContent" style="width:100%;height: 400px;"><{$Info.HelpContent}></textarea>
        </div>
    </div>
    <div class="layui-form-item inputTextWidth" pane>
        <label class="layui-form-label">是否禁用</label>
        <div class="layui-form layui-input-inline">
            <input type="radio" name="HelpState" value="1" class="layui-input" title="已启用" <{if condition="$Info['HelpState'] eq 1"}>checked<{/if}>>
            <input type="radio" name="HelpState" value="0" class="layui-input" title="已禁用" <{if condition="$Info['HelpState'] eq 0"}>checked<{/if}>>
        </div>
        <div class="layui-form-mid layui-word-aux"></div>
    </div>
    <div class="layui-form-item inputTextWidth" pane>
        <label class="layui-form-label">是否禁用</label>
        <div class="layui-form layui-input-inline">
            <input type="radio" name="HelpRecommendState" value="1" title="已推荐" <{if condition="$Info['HelpRecommendState'] eq 1"}>checked<{/if}>>
            <input type="radio" name="HelpRecommendState" value="0" title="未推荐" <{if condition="$Info['HelpRecommendState'] eq 0"}>checked<{/if}>>
        </div>
        <div class="layui-form-mid layui-word-aux"></div>
    </div>
    <div class="layui-form-item">
        <input type="hidden" name="HelpID" value="<{$Info.HelpID}>">
        <input type="hidden" id="HelpTypeID" name="HelpTypeID" value="<{$Info['HelpTypeID']}>">
        <input type="hidden" id="HelpTypePath" name="HelpTypePath" value="<{$Info['HelpTypePath']}>">
        <button class="layui-btn"  type="submit">提交保存</button>
    </div>
</form>
<{include file="public/admin_footer" /}>
<script>
    layui.use('upload', function(){
        var $ = layui.jquery,upload = layui.upload;
    });
</script>